package com.zcdyy.rentalofhouse.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.zcdyy.rentalofhouse.constant.Constants;
import com.zcdyy.rentalofhouse.ui.fragment.MainFragment;
import com.zcdyy.rentalofhouse.utils.BmobUtils;

/**
 * Created by chuan on 2017/3/12.
 */

public class MyBroadCastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("download")) {
            BmobUtils.queryCount++;
            //Log.e("onReceive", BmobUtils.queryCount + "");
            if (BmobUtils.queryCount == 5) {
                MainFragment.handler.sendEmptyMessage(Constants.ResultCode.SUCCESS);
            }
        }
    }
}
